﻿using CatUtils.Utils.Currency;
using CatUtils.Utils.Currency.TextUtils;
using CatUtils.Utils.SpecialUtils.Html;
using CatUtilsDll.Utils.Currency.WebUtils;
using RabbitDownload.Helper.Currency;

using System;
using System.Collections.Generic;

namespace RabbitDownload.WebSite.RomeSound
{
    internal class RomeeSoundScanner
    {
        public static List<string> StartScanner(String TAG)
        {
            TAG = TAG.Replace(" ", "+");
            TAG =  WebHelper.UrlEncode(TAG);
            String Api = string.Format("https://share.dmhy.org/topics/list?keyword={0}&sort_id=2&team_id=0&order=date-desc", TAG);
            Console.WriteLine(Api);
            return AnalysisApi(Api);
        }

        private static List<string> AnalysisApi(string api)
        {
            List<string> TitleList = new List<string>();

            String Shtml = WebHelper.HttpPcGet(api);

            return HtmlHelper.GetTextValueList(Shtml, "//td[@class='title']/a");
        }
    }
}